package com.springboot.rocketmq.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;

@Component
@Configuration
@PropertySource("classpath:application.properties")
@ConfigurationProperties(prefix = "myrocket.rocketmq")
@Data
public class RocketMQProperties {
    // NameServer地址
    private String namesrvAddr;
    // 生产者group名
    private String producer_groupName;
    // 生产者事务group名
    private String producer_transaction_groupName;
    // 生产者事务实例名称
    private String producer_tranInstanceName;
    // 生产者实例名称
    private String producer_instanceName;
    // 消费者group名
    private String consumer_groupName;
    // 消费者实例名称
    private String consumer_instanceName;
    // 消费者一次最大消费多少数量消息
    private int consumer_batchMaxSize;
    // 广播消费
    private boolean consumer_broadcasting;
    // 启动的时候是否消费历史记录
    private boolean enableHistoryConsumer;
    // 启动顺序消费
    private boolean enableOrderConsumer;
    // 消费的topic：tag
    private List<String> subscribe = new ArrayList<>();
}
